import 'package:flutter/material.dart';
import 'package:jicaimao_flutter/entity/account_bean.dart';

class MyChestInDatils extends StatefulWidget {
  List<AccountBeanResult> list;

  @override
  _MyChestInDatilsState createState() => _MyChestInDatilsState();
//  MyChestInDatils(this.list);
}

class _MyChestInDatilsState extends State<MyChestInDatils> {

  var time;
  var userAccout;
  var BSC_address;

  @override
  Widget build(BuildContext context) {
    return  new Scaffold(
      body: new Container(
        child: Column(
          children: <Widget>[
            Stack(
              children: <Widget>[
                Image.asset('images/bg_img.png'),
                Positioned(
                  left: 1.0,
                  top: 1.0,
                  right: 1.0,
                  child: AppBar(
                      centerTitle: true,
                      backgroundColor: Colors.transparent,
                      elevation: 100.0,
                      iconTheme: IconThemeData(
                        color: Colors.white,
                      ),
                      title: new Text(
                        '我的宝箱',
                        style: new TextStyle(color: Colors.white),
                      )
                  ),
                ),

                Positioned(
                    left: 10.0,
                    right: 10.0,
                    top: 95.0,
                    child: Image.asset('images/finaancial_head.png',width: 114.0,height: 114.0,)
                ),
                Positioned(
                    left: 10.0,
                    right: 10.0,
                    top: 125.0,
                    child: Column(
                      children: <Widget>[
                        Text("总积分",style: TextStyle(
                            color: Colors.white,
                            fontSize: 18.0
                        ),),
                        Text(null != userAccout ?userAccout.toStringAsFixed(4):"0.0000",style: TextStyle(
                            color: Colors.white,
                            fontSize: 20.0
                        ),)
                      ],
                    ))

              ],
            ),
            Container(
              color: Colors.white,
              alignment: Alignment.centerLeft,
              padding: EdgeInsets.all(15.0),
              child: Row(
                children: <Widget>[
                  Expanded(
                    child: Text( '转入时间',style: TextStyle(
                            color: Color(0xFF777777),
                            fontSize: 16.0
                        ),),

//                      crossAxisAlignment: CrossAxisAlignment.start,

                    flex: 1,
                  ),
                  Text(null != time ?time.toStringAsFixed(4):"2018.12.23",style: TextStyle(
                      color:  Color(0xFF333333),
                      fontSize: 15.0
                  ),)
                ],
              ),
            ),
            Container(
              color: Colors.white,
              alignment: Alignment.centerLeft,
              padding: EdgeInsets.all(15.0),
              child: Row(
                children: <Widget>[
                  Expanded(

              child: Text('BSC钱包地址',style: TextStyle(
                            color: Color(0xFF777777),
                            fontSize: 16.0
                        ),),
              flex: 1,
            ),

                  Text(null != BSC_address ?BSC_address.toStringAsFixed(4):"",style: TextStyle(
                      color: Color(0xFF333333),
                      fontSize: 15.0
                  ),)
                ],
              ),
            ),
          ],
        ),
      ),
    );
  }
}
